package com.itheima.consumer.domain;

import java.util.Objects;

public class Goods {
    private   Integer id;
    private   String  title;
    private   Double  price;
    private   String  count;

    public Goods() {
    }

    public Goods(Integer id, String title, Double price, String count) {
        this.id = id;
        this.title = title;
        this.price = price;
        this.count = count;
    }

    public Integer getId() {



        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    public String getCount() {
        return count;
    }

    public void setCount(String count) {
        this.count = count;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Goods goods = (Goods) o;
        return Objects.equals(id, goods.id) &&
                Objects.equals(title, goods.title) &&
                Objects.equals(price, goods.price) &&
                Objects.equals(count, goods.count);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, title, price, count);
    }

    @Override
    public String
    toString() {
        return "Goods{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", price=" + price +
                ", count='" + count + '\'' +
                '}';
    }
}
